package TestCTR;

import java.util.ArrayList;
import org.junit.Test;
import CTRLayer.ResponseListCTR;
import ModelLayer.ResponseList;

public class TestResponseListCTR
{
	ResponseListCTR rlc = new ResponseListCTR();
	ResponseList rl = new ResponseList();

	@Test
	public void testFindAllResponseLists() {
		ArrayList<ResponseList> rlclist = rlc.findAllResponseLists();
		int id = 0;
		System.out.println("\nAntal elementer i ResponseList : " + rlclist.size() + "\n");
		while (id < rlclist.size())
		{
			System.out.println("ResponseList id : " + rlclist.get(id).getResponseListID());
			System.out.println("number          : " + rlclist.get(id).getNumber());
			System.out.println("assignment      : " + rlclist.get(id).getAssignment());
			System.out.println("response        : " + rlclist.get(id).getResponse());
			System.out.println("masterCriterias : " + rlclist.get(id).getMasterCriterias());
			System.out.println("introduced      : " + rlclist.get(id).getIntroduced());
			System.out.println("mastered        : " + rlclist.get(id).getMastered());
			System.out.println("introSignature  : " + rlclist.get(id).getIntroSignature());
			System.out.println("mastSignature   : " + rlclist.get(id).getMastSignature());
			System.out.println("trained name    : " + rlclist.get(id).getTrained().getName());
			System.out.println("---------------------------------------------");
			id++;
		}
	}	
	
	@Test
	public void testFindResponseListID() {
		int id = 1;
		rl = rlc.findResponseListID(id);
		System.out.println("ResponseList id : " + rl.getResponseListID());
		System.out.println("number          : " + rl.getNumber());
		System.out.println("assignment      : " + rl.getAssignment());
		System.out.println("response        : " + rl.getResponse());
		System.out.println("masterCriterias : " + rl.getMasterCriterias());
		System.out.println("introduced      : " + rl.getIntroduced());
		System.out.println("mastered        : " + rl.getMastered());
		System.out.println("introSignature  : " + rl.getIntroSignature());
		System.out.println("mastSignature   : " + rl.getMastSignature());
		System.out.println("trained         : " + rl.getTrained());
	}

}
